package homework2.com.qianfeng.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import homework2.com.qianfeng.dao.IUserDao;
import homework2.com.qianfeng.pojo.User;
import homework2.com.qianfeng.service.IUserService;

@Service("userService")
public class UserServiceImpl implements IUserService {
	@Autowired
	@Qualifier("userDao")
	private IUserDao userDao;
	@Override
	public void add(User user) {
		userDao.addUser(user);
	}

	@Override
	public void deleteById(Integer id) {
		userDao.deleteUserById(id);
	}

	@Override
	public void update(User user) {
		userDao.updateUser(user);
	}

	@Override
	public User findById(Integer id) {
		return userDao.findUserById(id);
	}
	
}
